<html>
<head><title>Login Page</title>
<link rel="stylesheet" type="text/css" href="css/Default.css" />
<Script language="javascript" src="data/password.js"></script>
<Script language="javascript" src="exec/login.js"></script>
<SCRIPT LANGUAGE="JavaScript">
//check to see if they are logged in.
	function localCheck (){
		if(isLoggedIn()){
		//if they're logged in, move to the menu
			location.href="LoggedIn.php";
		}else{
		//check if the password + username are right.
			var a = check();
			if(a == true){
				location.href="LoggedIn.php";
			}else if(a == false){
			//alert user if password or username is incorrect
				alert("Incorrect username/password.");
			}
			
		}
	}
	
	window.onload = localCheck;

//name of cookie: 'eomdmf'

</SCRIPT>
</HEAD>
<body onkeypress="keyPress(event)">
<fieldset style="border-color:bfae20">
<legend>
<font size="3.5" face="Arial" color="bfae20">
<b>
Digital Media Feed
</b>
</legend>

<form name="login">
<center>Username <input type="text" name="User" size="20"></center>
<br>
<center>Password <input type="password" name="Pass" size="20"></center>
<br>
<center><input type="button" onclick='localCheck()' value="Login"><br></center>
</form>
<center>
<FORM METHOD="LINK" ACTION="index.html">
<INPUT TYPE="submit" VALUE="Return to Home Page">
</FORM>
</center>
</fieldset>
<script>
//this is for using the 'enter' key to submit the data
	function keyPress(event){
		if(event.which == 13){
			localCheck();
		}
	}
</script>

<br>
<br>
<center><img src= "media/Gold_Lion.jpg"/></center>
</body>
</html>
